blog-banner

Build a Python app with SQLAlchemy + CockroachDB

Last edited on July 28, 2020

0 minute read

    One of the great things about CockroachDB’s support for SQL is the ecosystem of frameworks, ORMs, and other tools for working with SQL data. SQLAlchemy is just one of the ORMs in that ecosystem, and one we use quite a bit for Python projects. You’ll find it referenced in some of our sample application docs, and our upcoming “CockroachDB for Python Developers” course has students use SQLAlchemy and Flask in projects.

    Given the prevalence of SQLAlchemy at Cockroach Labs and in the Python and Flask communities, we’re excited to announce a few updates that make our compatibility with SQLAlchemy even more seamless. Updates include new support for SAVEPOINT, and improved transaction retries (you can download the updated code and the sqlalchemy-cockroachdb Python package here).

    Our docs team has written a start-from-scratch tutorial on how to build a `Hello World` app with SQLAlchemy and CockroachDB. So if you’re a Python developer looking to get started with an easy SQL database, check out the tutorial here. Or if videos are more your thing, you can preview many of the lessons from the upcoming “CockroachDB for Python Developers” course on our .

    As always, if you have any comments or questions about CockroachDB and SQLAlchemy, stop by our community Slack. Happy querying!

    ORM
    tutorial
    python
    sqlalchemy
    flask